﻿using DongHuMgmt.Bussiness.Abstract;
using DongHuMgmt.DataAccess;
using System;
using System.Collections.Generic;
using System.Data.Entity;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace DongHuMgmt.Bussiness.Concrete
{
    public class SysUserService : BaseService, ISysUserService
    {
        public SysUserService(DbContext context) : base(context)
        {
        }

        public SysUser FindUserByLoginNameAndPassword(string loginName, string password)
        {
            SysUser user = Context.Set<SysUser>().Where(x => x.LoginName == loginName && x.Password == password).FirstOrDefault();
            return user;
        }
    }
}
